<?php

namespace zhtfrontend\models\datas;

use Yii;

/**
 * This is the model class for table "{{%orders_count}}".
 *
 * @property integer $id
 * @property integer $mechanic_id
 * @property integer $orders_id
 * @property integer $orders_items_id
 * @property integer $goods_id
 * @property integer $customer_id
 * @property integer $student_id
 * @property string $mechanic_name
 * @property string $goods_name
 * @property string $customer_name
 * @property string $student_name
 * @property integer $class_time
 * @property integer $mobile
 * @property string $actual_cash_money
 * @property string $actual_scholarship_money
 * @property integer $status
 * @property integer $created_at
 */
class OrdersCount extends \zhtfrontend\components\bases\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%orders_count}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['mechanic_id', 'orders_id', 'orders_items_id', 'goods_id', 'customer_id', 'student_id', 'class_time', 'mobile', 'status', 'created_at'], 'integer'],
            [['actual_cash_money', 'actual_scholarship_money'], 'number'],
            [['mechanic_name', 'goods_name', 'customer_name', 'student_name'], 'string', 'max' => 50],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('zhtfrontend', '自增id'),
            'mechanic_id' => Yii::t('zhtfrontend', '机构id'),
            'orders_id' => Yii::t('zhtfrontend', '订单id '),
            'orders_items_id' => Yii::t('zhtfrontend', '订单详情id'),
            'goods_id' => Yii::t('zhtfrontend', '商品id'),
            'customer_id' => Yii::t('zhtfrontend', '用户id'),
            'student_id' => Yii::t('zhtfrontend', '学生id'),
            'mechanic_name' => Yii::t('zhtfrontend', '机构名称'),
            'goods_name' => Yii::t('zhtfrontend', '课程名称'),
            'customer_name' => Yii::t('zhtfrontend', '用户姓名'),
            'student_name' => Yii::t('zhtfrontend', '学生姓名'),
            'class_time' => Yii::t('zhtfrontend', '上课时间'),
            'mobile' => Yii::t('zhtfrontend', '联系方式'),
            'actual_cash_money' => Yii::t('zhtfrontend', '最终使用金额'),
            'actual_scholarship_money' => Yii::t('zhtfrontend', '最终使用奖学金'),
            'status' => Yii::t('zhtfrontend', '订单状态 0 预约 1 续费'),
            'created_at' => Yii::t('zhtfrontend', '下单时间'),
        ];
    }
}
